home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96b.txt
/
000009_icon-group-sender _Thu Oct 3 11:10:04 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1997-01-02
|
3KB
Received: by cheltenham.cs.arizona.edu; Fri, 4 Oct 1996 11:05:25 MST
Date: 03 Oct 96 19:09:07 BST
From: R J Hare <rjhare@tattoo.ed.ac.uk>
Subject: Text & graphics
To: icon-group@cs.arizona.edu
Reply-To: rjhare@ed.ac.uk
Organisation: Edinburgh University Computing Services
Message-Id: <9610031909.aa16584@uk.ac.ed.tattoo>
Errors-To: icon-group-errors@cs.arizona.edu
I hope this will be the last daft question I have to ask about graphics for a
while!
I have a situation where I wish to type some text in a window on a line by line
basis, and have that text copied to a second window also on a line by line
basis, and to exactly the same point in the hidden window as on the visible
window (the two are exactly the same size). Here is the code I am using to do
this:
procedure typetext()
# get the x,y position of text start with left button.
repeat {case Event(page) of
{&lpress : {x:=&x
y:=&y
break}}}
GotoXY(page,x,y)
GotoXY(hpage,x,y)
repeat{char:=WReads(page,1)
if char == "\^c"
then break
if char == "\r"
then {y+:=size+2
GotoXY(page,x,y)
GotoXY(hpage,x,y)}
WWrites(hpage,char)}
return
end
What happens is that all is well in the visible window, but in the hidden
window, when I save it and then look at it (or when I turn off the
canvas="hidden" attribute), only the first line is in the correct position.
All other lines are left justifed to the edge of the window, not the selected
x position - like this:
Visible window Hidden window
____________________________________ ____________________________________
| | | |
| | | |
| | | |
| | | |
| | | |
| Some text typed in the visible | | Some text typed in the visible |
| window is justified perfectly | |window is justified perfectly |
| OK. The text is *not* laid | |OK. The text is *not* laid |
| out properly in the hidden | |out properly in the hidden |
| window. Why, Please? | |window. Why, Please? |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
|____________________________________| |___________________________________|
Any ideas why this should be the case please?
Thanks.
Roger Hare